package cn.com.roy.thread.t4_1_13.trylockparam;



public class Run {
    public static void main(String[] args) {
        try {
            final Myservice myservice = new Myservice();
            Runnable runnable = new Runnable() {
                public void run() {
                    System.out.println(Thread.currentThread().getName() + "调用waitMethod时间：" + System.currentTimeMillis());
                    myservice.testMethod();
                }
            };

            Thread t1 = new Thread(runnable);
            t1.setName("A");
            t1.start();


            Thread t2 = new Thread(runnable);
            t2.setName("B");
            t2.start();

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
